\hypertarget{class_q_qt_ethenet_manager}{}\section{Q\+Qt\+Ethenet\+Manager Class Reference}
\label{class_q_qt_ethenet_manager}\index{Q\+Qt\+Ethenet\+Manager@{Q\+Qt\+Ethenet\+Manager}}


The \mbox{\hyperlink{class_q_qt_ethenet_manager}{Q\+Qt\+Ethenet\+Manager}} class 原理： S1\+:系统启动，调用init\+\_\+net.\+sh S2\+:系统运行，用户通过页面设置\+Wi\+Fi或者有线的\+I\+P等，或者设置为自动获取。 保存\+I\+P到配置文件，启动时显示到用户页面上 保存\+I\+P等到init\+\_\+net.\+sh，系统启动时，网络连接状态正常。 保存\+Wi\+Fi设置等到/etc/wpa\+\_\+supplicant.conf S3\+:用户插拔网线，\+Wi\+Fi自动切换为有线。 S4\+:用户重启系统，进入\+S1.  




{\ttfamily \#include $<$qqtethenetmanager.\+h$>$}

Inheritance diagram for Q\+Qt\+Ethenet\+Manager\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_q_qt_ethenet_manager}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a9e32134b4fb3a3986d6e89ed2471ebd3}\label{class_q_qt_ethenet_manager_a9e32134b4fb3a3986d6e89ed2471ebd3}} 
void {\bfseries sig\+Scanning} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_acdc4c4de399cea78bc0f3baae9314554}\label{class_q_qt_ethenet_manager_acdc4c4de399cea78bc0f3baae9314554}} 
void {\bfseries sig\+Dis\+Connected} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a29f51ac158bc7dc360962b7fa05ecc7b}\label{class_q_qt_ethenet_manager_a29f51ac158bc7dc360962b7fa05ecc7b}} 
void {\bfseries sig\+Connecting} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a62eedfc563941f2326d99f7b702e4f82}\label{class_q_qt_ethenet_manager_a62eedfc563941f2326d99f7b702e4f82}} 
void {\bfseries sig\+Connected} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a8f7dc6cb625cf767602f96ca8e66ef70}\label{class_q_qt_ethenet_manager_a8f7dc6cb625cf767602f96ca8e66ef70}} 
void {\bfseries sig\+Refreshed} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a6e36d6af1b87ef9fab2023e7e6c76b27}\label{class_q_qt_ethenet_manager_a6e36d6af1b87ef9fab2023e7e6c76b27}} 
void {\bfseries sig\+Status\+Changed} (Q\+String status)
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a3ab61e173072fa7d9e1de386d5404956}\label{class_q_qt_ethenet_manager_a3ab61e173072fa7d9e1de386d5404956}} 
void {\bfseries sig\+Lan\+Connected} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a733c3bbc21d85d4bd284598466d7120c}\label{class_q_qt_ethenet_manager_a733c3bbc21d85d4bd284598466d7120c}} 
void {\bfseries sig\+Lan\+Dis\+Connected} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_aa72eceec1be28fd06dc35efe4069964c}\label{class_q_qt_ethenet_manager_aa72eceec1be28fd06dc35efe4069964c}} 
void {\bfseries sig\+Network\+Clear} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_ae9bb42c6d5bae1c8c7be72d2c2eeba4c}\label{class_q_qt_ethenet_manager_ae9bb42c6d5bae1c8c7be72d2c2eeba4c}} 
void {\bfseries sig\+Network\+Not\+Clear} ()
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a5d51e8e01fe560328f6e22237071f7ec}\label{class_q_qt_ethenet_manager_a5d51e8e01fe560328f6e22237071f7ec}} 
Q\+List$<$ T\+Wifi $>$ \& {\bfseries wifi\+List} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_ae42b4efca1a95fe0fe628e54278061d9}\label{class_q_qt_ethenet_manager_ae42b4efca1a95fe0fe628e54278061d9}} 
T\+Wifi {\bfseries current\+Wifi} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_aa775846127e09ad4803353fc53c062d0}\label{class_q_qt_ethenet_manager_aa775846127e09ad4803353fc53c062d0}} 
bool {\bfseries set\+Current\+Wifi} (Q\+String bssid\+\_\+mac, Q\+String password=\char`\"{}\char`\"{})
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a4aaa9312432e6054076778061831153e}\label{class_q_qt_ethenet_manager_a4aaa9312432e6054076778061831153e}} 
void {\bfseries set\+Refresh} (bool ref=true)
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a3ee154ddd357def5528da6afc985af49}\label{class_q_qt_ethenet_manager_a3ee154ddd357def5528da6afc985af49}} 
void {\bfseries set\+D\+H\+CP} (bool b\+Use=false)
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a77386353b7ca81c554807ab034de7cc9}\label{class_q_qt_ethenet_manager_a77386353b7ca81c554807ab034de7cc9}} 
void {\bfseries set\+Addr} (Q\+String ip, Q\+String mask, Q\+String gw, Q\+String dns)
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a546f3e1be8ce3ed6ab8971d929e20984}\label{class_q_qt_ethenet_manager_a546f3e1be8ce3ed6ab8971d929e20984}} 
void {\bfseries get\+Addr} (Q\+String \&ip, Q\+String \&mask, Q\+String \&gw, Q\+String \&dns)
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a7ec667d769fbf71e144066260c70041b}\label{class_q_qt_ethenet_manager_a7ec667d769fbf71e144066260c70041b}} 
void \mbox{\hyperlink{class_q_qt_ethenet_manager_a7ec667d769fbf71e144066260c70041b}{ipconfig}} ()
\begin{DoxyCompactList}\small\item\em config\+I\+P\+Address wpa\+\_\+suplicant.\+conf init\+\_\+net.\+sh ipaddr.\+conf \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a9b0b507497b069b45ba18a661046b4f4}\label{class_q_qt_ethenet_manager_a9b0b507497b069b45ba18a661046b4f4}} 
Q\+String {\bfseries current\+Net\+Name} ()
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_adeb6db94e1a394e6a07d97ce48a6edea}\label{class_q_qt_ethenet_manager_adeb6db94e1a394e6a07d97ce48a6edea}} 
Q\+Timer $\ast$ {\bfseries work\+Timer} ()
\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_qt_ethenet_manager_a2bb5794eb2bd79751d7ed748735bed5f}\label{class_q_qt_ethenet_manager_a2bb5794eb2bd79751d7ed748735bed5f}} 
static \mbox{\hyperlink{class_q_qt_ethenet_manager}{Q\+Qt\+Ethenet\+Manager}} $\ast$ {\bfseries Instance} (Q\+Object $\ast$parent=0)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \mbox{\hyperlink{class_q_qt_ethenet_manager}{Q\+Qt\+Ethenet\+Manager}} class 原理： S1\+:系统启动，调用init\+\_\+net.\+sh S2\+:系统运行，用户通过页面设置\+Wi\+Fi或者有线的\+I\+P等，或者设置为自动获取。 保存\+I\+P到配置文件，启动时显示到用户页面上 保存\+I\+P等到init\+\_\+net.\+sh，系统启动时，网络连接状态正常。 保存\+Wi\+Fi设置等到/etc/wpa\+\_\+supplicant.conf S3\+:用户插拔网线，\+Wi\+Fi自动切换为有线。 S4\+:用户重启系统，进入\+S1. 

使用说明： 调用\+Q\+Qt\+Ethnet\+Manager\+::\+Instance(parent)，并且连接相应的\+Wi\+Fi信号和用户的槽 通过wifi\+List()，显示给用户看\+Wi\+Fi列表。每5s自动更新一次。在槽当中调用并更新界面 通过set\+Current\+Wi\+Fi()更换用户连接的\+Wi\+Fi。用户点击更改输入密码了，就调这个保存。会自动配置\+Wi\+Fi和根据用户\+I\+P或者\+D\+H\+C\+P重来连接新\+Wi\+Fi。 

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
R\+:/\+Develop/a0-\/develop/\+Lib\+Q\+Qt/src/network/qqtethenetmanager.\+h\item 
R\+:/\+Develop/a0-\/develop/\+Lib\+Q\+Qt/src/network/qqtethenetmanager.\+cpp\end{DoxyCompactItemize}
